package com.atguigu.springcloud.alibaba.service.impl;

import com.atguigu.springcloud.alibaba.dao.StorageDao;
import com.atguigu.springcloud.alibaba.service.StorageSercive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @BelongsProject: cloud2020
 * @BelongsPackage: com.atguigu.springcloud.alibaba.service.impl
 * @Author: LiYing
 * @CreateTime: 2021-03-11 19:54
 * @Description:
 */
@Service
@Slf4j
public class StorageServiceImpl implements  StorageSercive{


    @Resource
    private StorageDao storageDao;

    /**
     * 减库存
     *
     * @param productId
     * @param count
     * @return
     */

    @Override
    public void decrease(Long productId, Integer count) {

        storageDao.decrease(productId,count);

    }
}
